package com.css.dzj.dzjdzqs.modules.aplaw.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.base.Objects;
import javax.persistence.*;
import java.util.Date;


/**法律法规库
 * @Author WT
 * @Date 2020/6/29
 */
@Entity
@Table(name = "JG_ZSK_LAW", schema = "DZJJH", catalog = "")
public class ApLawEntity {
    //法律法规类别
    private String lawsType;
    //法律法规名称
    private String legalName;
    //发布机关
    private String publishingAuthority;
    //发布文号
    private String releaseNumber;
    //发布日期
    private Date releaseDate;
    //施行日期
    private Date dateImplementation;
    //法律法规内容
    private String legalRegulatoryContent;
    //关键字
    private String keyword;
    //主键Id
    private String publicId;

    @Basic
    @Column(name = "Laws_Type")
    public String getLawsType() {
        return lawsType;
    }

    public void setLawsType(String lawsType) {
        this.lawsType = lawsType;
    }

    @Basic
    @Column(name = "Legal_Name")
    public String getLegalName() {
        return legalName;
    }

    public void setLegalName(String legalName) {
        this.legalName = legalName;
    }

    @Basic
    @Column(name = "Publishing_Authority")
    public String getPublishingAuthority() {
        return publishingAuthority;
    }

    public void setPublishingAuthority(String publishingAuthority) {
        this.publishingAuthority = publishingAuthority;
    }

    @Basic
    @Column(name = "Release_Number")
    public String getReleaseNumber() {
        return releaseNumber;
    }

    public void setReleaseNumber(String releaseNumber) {
        this.releaseNumber = releaseNumber;
    }

    @Basic
    @Column(name = "Release_Date")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(Date releaseDate) {
        this.releaseDate = releaseDate;
    }

    @Basic
    @Column(name = "Date_Implementation")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getDateImplementation() {
        return dateImplementation;
    }

    public void setDateImplementation(Date dateImplementation) {
        this.dateImplementation = dateImplementation;
    }

    @Basic
    @Column(name = "Legal_regulatory_Content")
    public String getLegalRegulatoryContent() {
        return legalRegulatoryContent;
    }

    public void setLegalRegulatoryContent(String legalRegulatoryContent) {
        this.legalRegulatoryContent = legalRegulatoryContent;
    }

    @Basic
    @Column(name = "Keyword")
    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    @Id
    @Column(name = "PUBLIC_ID")
    public String getPublicId() {
        return publicId;
    }

    public void setPublicId(String publicId) {
        this.publicId = publicId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ApLawEntity that = (ApLawEntity) o;
        return Objects.equal(lawsType, that.lawsType) &&
                Objects.equal(legalName, that.legalName) &&
                Objects.equal(publishingAuthority, that.publishingAuthority) &&
                Objects.equal(releaseNumber, that.releaseNumber) &&
                Objects.equal(releaseDate, that.releaseDate) &&
                Objects.equal(dateImplementation, that.dateImplementation) &&
                Objects.equal(legalRegulatoryContent, that.legalRegulatoryContent) &&
                Objects.equal(keyword, that.keyword) &&
                Objects.equal(publicId, that.publicId);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(lawsType, legalName, publishingAuthority, releaseNumber, releaseDate, dateImplementation, legalRegulatoryContent, keyword, publicId);
    }
}
